import HTTP from '../../axios/http';

export default function logOut (params) {
  return function (dispatch) {
    return HTTP.post("/user/logout").then(res => {
      if (res.data.code === 0) {
        dispatch({
          type: "LOGOUT"
        });
      }
      return res.data;
    })
  }
}